1. Field of the Invention
The present invention relates to an image processing technique for embedding data in a print image.
2. Description of the Related Art
In recent years, an image processing method that converts data to be embedded into code data that requires some decoding processing, and prints the code data on a print medium has prevailed.
For example, this code data is two-dimensionally embedded with data, and is called a two-dimensional (2D) code.
The user cannot recognize the contents of the printed code data intact. When the user reads the code data as image data using a reader, and applies corresponding decoding processing to that image data, he or she can recognize the contents of the code data.
In general, the read image data is transferred to a computer, and an application program which runs on the computer decodes the image data. However, the decoding method is not limited to such specific method. For example, a mobile phone compatible to the 2D code can decode the code data inside its reader, or a copying machine having a plurality of functions can internally decode the code data.
Normally, code data is printed on a print medium together with text and images to be printed. As a technique for printing the code data on a print medium, a technique for providing directionality to the size of a rectangle calculated in consideration of the code data and a paper size to be used in printing, and embedding the code data in that rectangle is known (for example, see Japanese Patent Laid-Open No. 2003-101762).
Upon applying the code data to a print medium (mainly, a paper sheet), the data size (code size) of the code data have a tradeoff relationship with image quality after combining text and images to be printed together with the code data. For example, if the paper size to be used in printing remains the same, the size of code data to be added increases with increasing data to be embedded. Upon enhancing error robustness, the size of this code data further increases. As a result, after combining with text and images to be printed, the code data impairs image quality since it looks like noise. Hence, in order to add the code data so as not to impair image quality, a data size required to enhance the error robustness such as the size of an error correction code and the like must be limited to some extent.
To this end, Japanese Patent Laid-Open No. 2004-104494 discloses a technique for adjusting image quality after combining code data with text and images to be printed and the error robustness.
However, the conventional code data generation processing does not consider the print characteristics of an output device (a copying machine or a printer), which change due to individual differences, environmental changes, and time differences.